package com.eascs.workflow.sys.dao;

import com.eascs.app.dao.PageResult;
import com.eascs.web.sso.User;
import com.eascs.workflow.common.entity.sys.HREmployeeAuditor;
import com.eascs.workflow.common.entity.sys.SysRole;
import com.eascs.workflow.common.entity.sys.SysUser;
import com.eascs.workflow.sys.vo.EmployeeVo;
import com.eascs.workflow.sys.vo.UserVo;

import java.util.List;
import java.util.Map;

public interface SysUserDao {

	/**
	 * 根据角色查询用户
	 */
	public List<SysUser> queryByUsernameWithRoles(SysRole role);

	/**
	 * 根据组织和角色查找用户
	 * 
	 * @param userNo
	 * @return
	 */
	public List<User> getUserByOrgAndRole(String orgNo, String roleNo);

	public List<User> getUserByNos(List<String> userNoList);
	
	public List<User> getUserByNosWithDMS(List<String> userNoList);

	public PageResult<User> searchEmployeePage(Map<String, String> param, int pageSize, int pageIndex);

	public User getSysUserById(String userNo);

	public List<Object[]> getLikeEmployeeList(String likeStr);

	public Boolean checkIsAdmin(String userNo);

	public Boolean checkUserRole(String userNo, String roleCode);
	
	public Boolean checkUserRole(String userNo, List<String> roleCodeList);

	public PageResult<UserVo> getSysUserInSystem(String userNo, String orgId, int pageIndex, int pageSize);

	/**
	 * 查询所有的客户(包含删除的)
	 * @param vo
	 * @param pageIndex
	 * @return
	 */
	public PageResult<Object[]> getAllUser(EmployeeVo vo, int pageIndex);

	/**
	 * 根据userno 查询用户
	 * @param vo
	 * @return
	 */
	public Object[] queryUserEmployeeByUserNo(EmployeeVo vo) ;
	/**
	 * 编辑用户的在职状态和入职时间
	 * @param vo
	 * @return
	 */
	public boolean editorUserStatus(EmployeeVo vo);

	public void deleteUserResources(String userNo);

	/**
	 * 根据组织IDs和角色获取
	 * 
	 * @param orgIdList
	 * @param roleCode
	 * @return
	 */
	public List<SysUser> getUserByOrgIdsAndRoleCode(List<String> orgIdList, String roleCode);
	
	public List<SysUser> getUserByOrgIdsAndRoleCode(List<String> orgIdList, List<String> roleCodeList);

	public HREmployeeAuditor getEmployeeAuditor(String employNo, String auditorType);
	
	public List<HREmployeeAuditor> getAuditorWithNo(String employNo);
	
	public User getUserInSystem(String userNo);
	public List<Object[]> getLikePostList(EmployeeVo vo);
}
